﻿using System;
using System.Collections.Generic;
using System.Linq;
using 工具.集合操作;

namespace 工具
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("工具 请选择具体的工具");
            BaseFunction func = null;
            while (true)
            {
                string input = Console.ReadLine();
                if (func == null)
                {
                    switch (input)
                    {
                        case "聚合":
                            func = new ListFunction聚合();
                            continue;
                        case "倒叙":
                            func = new ListFunction倒叙();
                            continue;
                        default:
                            Console.WriteLine("无效的类型");
                            continue;
                    }
                }
                string temp = input;
                if (input.Length >= 4)
                {
                    temp = input.Substring(0, 4);
                }
                switch (temp)
                {
                    case "end":
                        func.End();
                        func.InputContent = new List<string>();
                        continue;
                    case "end ":
                        func.End();
                        func = null;
                        continue;
                    default:
                        func.InputContent.Add(input);
                        continue;
                }
            }






        }
    }
}
